<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link rel="stylesheet" href="${resource(dir:'css/jquery',file:'jquery-ui-1.8.10.custom.css')}" />
        <link rel="stylesheet" href="${resource(dir:'css',file:'main-layout.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <g:javascript src="jquery/jquery-1.4.4.min.js" />
        <g:javascript src="jquery/jquery-ui-1.8.10.custom.min.js" />
        <g:javascript src="jquery/jquery.validate.min.js" />
        <g:javascript src="jquery/jquery.blockUI.js" />
        <g:javascript src="main-layout.js" />
        <g:layoutHead />
        <script type='text/javascript'>
            $(document).ready(function() {
                $('#'.concat(activePage,'_label')).addClass('active_menu_item_label');
                $("button").button();
            });
        </script>
    </head>

    <body>
        <div id="logo-wrapper">
            <div id="logo">
                <img src="${resource(dir:'images',file:'small_globe.png')}" alt="" />
            </div>
            <div id="logo-text">
                <p>Kassiopeia</p>
            </div>
            <sec:ifLoggedIn>
                <div id="user-panel">
                    <p>Welcome, <span id="username"><sec:username /></span></p>
                </div>
            </sec:ifLoggedIn>
        </div>

        <div id="content-wrapper">
            <div id="content">
                <sec:ifLoggedIn>
                    <div id="menu">
                        <div class="menu_item">
                            <a href="${createLink(controller:'home')}">
                                <img src="${resource(dir:'images/menu',file:'home.png')}" alt="Home" />
                                <span class="menu_item_label" id="home_label">Home</span>
                            </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'composition')}">
                                <img src="${resource(dir:'images/menu',file:'composition.png')}" alt="Composition" />
                                <span class="menu_item_label" id="composition_label">Composition</span>
                            </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'distribution')}">
                                <img src="${resource(dir:'images/menu',file:'distribution.png')}" alt="Distribution" />
                                <span class="menu_item_label" id="distribution_label">Distribution</span>
                           </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'results')}">
                                <img src="${resource(dir:'images/menu',file:'results.png')}" alt="Results" />
                                <span class="menu_item_label" id="results_label">Results</span>
                           </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'management')}">
                                <img src="${resource(dir:'images/menu',file:'management.png')}" alt="Management" />
                                <span class="menu_item_label" id="management_label">Management</span>
                            </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'monitoring')}">
                                <img src="${resource(dir:'images/menu',file:'monitoring.png')}" alt="Monitoring" />
                                <span class="menu_item_label" id="monitoring_label">Monitoring</span>
                            </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'logs')}">
                                <img src="${resource(dir:'images/menu',file:'logs.png')}" alt="Logs" />
                                <span class="menu_item_label" id="logs_label">Logs</span>
                            </a>
                        </div>
                        <div class="menu_item">
                            <a href="${createLink(controller:'repository')}">
                                <img src="${resource(dir:'images/menu',file:'repository.png')}" alt="Repository" />
                                <span class="menu_item_label" id="repository_label">Repository</span>
                            </a>
                        </div>
                        <div class="menu_item right_bordered_menu_item">
                            <a href="${createLink(controller:'logout')}">
                                <img src="${resource(dir:'images/menu',file:'logout.png')}" alt="Logout" />
                                <span class="menu_item_label" id="logout_label">Logout</span>
                            </a>
                        </div>
                    </div>
                </sec:ifLoggedIn>
                <div id="page-content-wrapper">
                    <g:layoutBody />
                </div>
            </div>
        </div>

        <div id="footer">
            <div id="footer-content">
                <p class="message-blue">
                    This is the beta version (seriously). Some functions may not be available.
                </p>
                <p class="message-mail">
                    Please, don't hesitate to contact us: <a href="mailto:kassiopeia@googlegroups.com">kassiopeia@googlegroups.com</a>
                </p>
                <p>
                    &copy; Copyright 2011 Kassiopeia Team All rights reserved
                </p>
                <p id="powered-by">
                    Powered by <img src="${resource(dir:'images',file:'grails_logo.png')}" alt="Grails" />
                </p>
            </div>
        </div>
    </body>
</html>
